import Vue from 'vue'

// ——————————————————
import 'normalize.css/normalize.css'// A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import router from './router'
import store from './store'
import http from './http'
import VueBus from './eventbus'
// import axios from 'axios'
import '@/icons' // icon
// import '@/permission' // permission control
import locale from 'element-ui/lib/locale/lang/zh-CN'
import util from './utils/util'

import echarts from 'echarts'
import projectList from './views/dashboard/projectList.vue'
// axios.defaults.baseURL = 'http://127.0.0.1'
// axios.defaults.baseURL = 'http://139.199.2.29:8080'
Vue.prototype.GLOBAL = projectList

Vue.prototype.$echarts = echarts

Vue.use(ElementUI, { locale })

Vue.config.productionTip = false
Vue.use(http)
Vue.use(VueBus)
// 下拉
import Dropdown from 'hsy-vue-dropdown'
Vue.use(Dropdown)
// 引入工具，配置代理
Vue.prototype.$utilHelper = util
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})

// v-viewer
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'

// Vue.use(Viewer) 默认配置写法
Vue.use(Viewer, {
    defaultOptions: {
        zIndex: 9999
    }
})
